/**
 * Copyright (C) 2022
 * All rights reserved, Designed By www.joolun.com
 * 注意：
 * 本软件为www.joolun.com开发研制，项目使用请保留此说明
 */
package com.joolun.tennis.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joolun.tennis.domain.TennisClass;
import com.joolun.tennis.mapper.TennisClassMapper;
import com.joolun.tennis.service.IClubService;
import com.joolun.tennis.service.TennisClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;

/**
 * spu商品s
 *
 * @author JL
 * @date 2019-08-12 16:25:10
 */
@Service
public class TennisClassServiceImpl extends ServiceImpl<TennisClassMapper, TennisClass> implements TennisClassService {


	@Autowired
	private IClubService clubService;

	@Override
	@Transactional(rollbackFor = Exception.class)
	public boolean removeById(Serializable id) {
		super.removeById(id);
		return true;
	}

	@Override
	public IPage<TennisClass> page1(IPage<TennisClass> page, TennisClass TennisClass) {
		return baseMapper.selectPage1(page, TennisClass);
	}

	@Override
	@Transactional(rollbackFor = Exception.class)
	public boolean save1(TennisClass TennisClass) {

		baseMapper.insert(TennisClass);
		return true;
	}

	@Override
	@Transactional(rollbackFor = Exception.class)
	public boolean updateById1(TennisClass TennisClass) {
		baseMapper.updateById(TennisClass);
		return true;
	}

	@Override
	public TennisClass getById1(String id) {
		return baseMapper.selectById1(id);
	}

	@Override
	public TennisClass getById2(String id) {
		return baseMapper.selectById2(id);
	}

}
